﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GetInTouchUC.ascx.cs"
    Inherits="VCN.home.UC.GetInTouchUC" %>
<div id="GetInTouchUC">
    <div class="style-getintouch">
        <h2>
            Get In Touch</h2>
    </div>
    <%
        string[] head = { "PHONE", "FAX", "EMAIL", "YAHOO", "FACEBOOK", "YOUTUBE" };
        VCN.App.DataAccessLayer.GetInTouchDAO getintouchDao = new VCN.App.DataAccessLayer.GetInTouchDAO();
        System.Collections.Generic.List<VCN.App.DataTransferObjects.GetInTouch> listgetintouch = getintouchDao.selectAllList();
        if (listgetintouch != null && listgetintouch.Count != 0)
        {
    %><div class="style-contact">
        <%                           
            Response.Write(string.Format("<div class='style-contact-1'><div class='contact-ico'><img src='/home/Images/wrapper/{0}' alt='{1}'/></div><div class='contact-text'><h3>{2}</h3><h4>{3}</h4></div></div>", listgetintouch[0].Image, head[0], head[0], listgetintouch[0].Infirmation));

            if (listgetintouch.Count > 1)
            {
                Response.Write(string.Format("<div class='style-contact-1'><div class='contact-ico'><img src='/home/Images/wrapper/{0}' alt='{1}'/></div><div class='contact-text'><h3>{2}</h3><h4>{3}</h4></div></div>", listgetintouch[1].Image, head[1], head[1], listgetintouch[1].Infirmation));
            }

            if (listgetintouch.Count > 2)
            {
                Response.Write(string.Format("<div class='style-contact-1'><div class='contact-ico'><img src='/home/Images/wrapper/{0}' alt='{1}'/></div><div class='contact-text'><h3>{2}</h3><h4><a href='mailto:{3}'>{4}</a></h4></div></div>", listgetintouch[2].Image, head[2], head[2], listgetintouch[2].Infirmation, listgetintouch[2].Infirmation));
            }

            if (listgetintouch.Count > 3)
            {
                Response.Write(string.Format("<div class='style-contact-1'><div class='contact-ico'><img src='/home/Images/wrapper/{0}' alt='{1}'/></div><div class='contact-text'><h3>{2}</h3><h4><a href='skype:{3}?call'>{4}</a></h4></div></div>", listgetintouch[3].Image, head[3], head[3], listgetintouch[3].Infirmation, listgetintouch[3].Infirmation));
            }
        %>
    </div>
    <div class="style-contact-2" align="center">
        <%
            if (listgetintouch.Count > 4)
            {
                Response.Write(string.Format("<a href='{0}'><img src='/home/Images/wrapper/{1}' alt='{2}'/></a>", listgetintouch[4].Infirmation, listgetintouch[4].Image, head[4]));
            }
            if (listgetintouch.Count > 5)
            {
                Response.Write(string.Format("<a href='{0}'><img src='/home/Images/wrapper/{1}' alt='{2}'/></a>", listgetintouch[5].Infirmation, listgetintouch[5].Image, head[5]));
            }
        %>
    </div>
    <%} %>
</div>
